﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;

namespace Quanlytruongtruongtieuhoc
{
    public partial class frmDamnhanchucvu : Form
    {
        public frmDamnhanchucvu()
        {
            InitializeComponent();
        }

        private void btOk_Click(object sender, EventArgs e)
        {
            this.Hide();
        }

        private void frmDamnhanchucvu_Load(object sender, EventArgs e)
        {
            SqlDataAdapter ap = new SqlDataAdapter("select convert(char(10),ngay_bd,103),b.ten_cv from dam_nhiem_chuc_vu a,chuc_vu b where a.ma_cv=b.ma_cv and a.ma_gv='" + frmHosogiaovien.layma + "'", clsKetnoi.con);
            DataTable A = new DataTable();
            A.Clear();
            ap.Fill(A);
            DataRow row = A.Rows[0];
            txtChucvu.Text = row[1].ToString();
            txtNgaybd.Text = row[0].ToString();
        }
    }
}
